package com.szgz.platform.service;

import java.io.File;
import java.util.Map;

public interface SharedContainerService {

    int allocatePort();

    ProcessBuilder pbDocker(String... args);

    void waitForContainerReady(String containerName, int timeoutSeconds) throws Exception;

    void persistPorts(String groupDir, Map<String, Integer> mapping);

    Map<String, Integer> readPortsByGroupId(String groupId);

    Map<String, Integer> readPortsByDir(String groupDir);

    void deleteDirectory(File dir);
}

